<template>

query: {{ query.id }} - {{ query.title }} - {{ query.content }}<br/>
params: {{ params.id }} - {{ params.title }}<br/>
props: {{ id }} - {{ title }} - {{ content }} - {{ msg }}<br/>

</template>
<script setup lang="ts">
import { toRefs } from 'vue';
import { useRoute } from 'vue-router';

const route = useRoute();
// 这样才是响应式对象
const { query, params } = toRefs(route);

// 指定 props 才可以获取到
defineProps(['id', 'title', 'content', 'msg']);

</script>
<style lang="scss" scoped>


</style>
